<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page session="true"%>
<%

 if(session.getAttribute("user")==null){
 
   RequestDispatcher rd=request.getRequestDispatcher("/jsps/LoginForm.jsp");
  rd.forward(request,response);
   
 %>
 <%} %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
   <head>
  
  <script language="JavaScript" src="<%=request.getContextPath()+"/js/gen_validatorv31.js"%>" type="text/javascript"></script>
  
  


</head>
  
  <body >
  
 
 <jsp:include page="Header.jsp"></jsp:include>
 <br/>
  <center><b><h4>Village Update Form</h4></b></center>
   
	
		<form action="<%=request.getContextPath()+"/UpdateVillageAction"%>" method="post" name="login">
		
		


<table align="center" bgcolor=#87CEEB width="325" height="60">
		         
		           
		           <c:if test="${not empty villageTo}">
		          
		          
				<tr><td align='right'><b>Village ID :</b><br></td><td> <input type=text name="vid"  value="${villageTo.vid }"     readonly="readonly"/>
				<br><tr><td align='right'><b>State Name :</b><br></td><td> <input type=text name="sname"  value="${villageTo.sname }" readonly="readonly"      />
				<br><tr><td align='right'><b>District Name :</b><br></td><td> <input type=text name="dname"  value="${villageTo.dname }"  readonly="readonly" />
				<br><tr><td align='right'><b>Village Name :</b><br></td><td> <input type=text name="vname"  value="${villageTo.vname }"       />
				<br></td><td><br></td></tr>
				
				
				</c:if>
				<tr><td colspan='2' align='center'><input type=submit value="SUBMIT" /><br></td><td>&nbsp;<br></td></tr>
			
	    </table>

<br/>
     <jsp:include page="Footer.jsp"></jsp:include>

   </form>
   
   <script language="JavaScript" type="text/javascript">
//You should create the validator only after the definition of the HTML form
  var frmvalidator  = new Validator("login");

  frmvalidator.addValidation("sname","req","State Name is required");
    frmvalidator.addValidation("sname","alpha","State Name is Only Characters");
    
    frmvalidator.addValidation("dname","req","District Name is required");
    frmvalidator.addValidation("dname","alpha","District Name is Only Characters");
    
    frmvalidator.addValidation("mname","req","Mandal Name is required");
    frmvalidator.addValidation("mname","alpha","Mandal Name is Only Characters");
    
    frmvalidator.addValidation("vname","req","Village Name is required");
    frmvalidator.addValidation("vname","alpha","Village Name is Only Characters");
    
    </script>
  </body>
</html>
